package com.zhang.authoritycenter.common.model.dao.auth;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author KingHood
 * @since 2023-12-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_base")
public class UserBaseDO extends Model<UserBaseDO> {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Long id;

    /**
     * 账号
     */
    @TableField("username")
    private String username;

    /**
     * 真实姓名
     */
    @TableField(value = "real_name")
    private String realName;

    /**
     * 昵称
     */
    @TableField(value = "nick_name",updateStrategy = FieldStrategy.IGNORED)
    private String nickName;

    /**
     * 密码
     */
    @TableField("password")
    private String password;

    /**
     * 手机号
     */
    @TableField(value = "mobile",updateStrategy = FieldStrategy.IGNORED)
    private String mobile;

    /**
     * 状态 (0：禁用 1启用)
     */
    @TableField("status")
    private Integer status;

    /**
     * 主部门id
     */
    @TableField("organization_id")
    private Long organizationId;

    /**
     * 工号
     */
    @TableField(value = "job_number",updateStrategy = FieldStrategy.IGNORED)
    private String jobNumber;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;

    /**
     * 创建人人id
     */
    @TableField("create_user_id")
    private Long createUserId;

    /**
     * 最后修改人id
     */
    @TableField("update_user_id")
    private Long updateUserId;

    /**
     * 是否删除：0未删除；1已删除
     */
    @TableField("is_delete")
    private Integer isDelete;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
